package com.gite.nouette.admin.implementation.integrator.assembler;

import com.gite.nouette.admin.contract.integrator.assembler.IAssemblerHandlerModule;
import com.gite.nouette.admin.contract.integrator.director.IDirectorHandlerModule;
import com.gite.nouette.admin.contract.model.IManager;

public abstract class AbstractAssemblerHandlerModule implements
		IAssemblerHandlerModule {
	private IManager parentProduct;
	private IDirectorHandlerModule director;

	@Override
	public IManager getParentProduct() {
		return this.parentProduct;
	}

	@Override
	public void setParentProduct(IManager parentProduct) {
		this.parentProduct = parentProduct;
	}

	@Override
	public IDirectorHandlerModule getDirector() {
		return this.director;
	}

	@Override
	public void setDirector(IDirectorHandlerModule director) {
		this.director = director;
	}

	@Override
	public void run() {
		getDirector().constructProduct();
		getParentProduct().setHandlerModule(getDirector().getProduct());
	}
}
